home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / mklib.beos-ppc < prev    next >
Text File  |  1998-12-15  |  1KB  |  57 lines

  1. #!/bin/sh
  2.  
  3. # Make a library file for BeOS on PowerPC
  4.  
  5. #--identification------------------------------------------------------
  6.  
  7. # $Id: mklib.beos-ppc,v 3.0 1998/07/30 23:50:11 brianp Exp $
  8.  
  9. # $Log: mklib.beos-ppc,v $
  10. # Revision 3.0  1998/07/30 23:50:11  brianp
  11. # initial rev
  12. #
  13.  
  14. #--common--------------------------------------------------------------
  15.  
  16. # Usage:  mklib libname major minor file.o ...
  17. #
  18. # First argument is name of output library (LIBRARY)
  19. # Second arg is major version number (MAJOR)
  20. # Third arg is minor version number (MINOR)
  21. # Rest of arguments are object files (OBJECTS)
  22.  
  23. LIBRARY=$1
  24. shift 1
  25.  
  26. MAJOR=$1
  27. shift 1
  28.  
  29. MINOR=$1
  30. shift 1
  31.  
  32. OBJECTS=$*
  33.  
  34. #--platform-------------------------------------------------------------
  35.  
  36. # build system library pathnames
  37. SYSLIBNAMES="libmoto.a libroot.so libbe.so glue-noinit.a init_term_dyn.o start_dyn.o lib3DfxGlide2X.so"
  38.  
  39. for i in `echo $BELIBRARIES | sed "s/;/ /g"`
  40. do
  41.     for j in $SYSLIBNAMES
  42.     do
  43.         if [ -e $i/$j ] ; then SYSLIBS="$SYSLIBS $i/$j" ; fi
  44.     done
  45. done
  46.  
  47. # remove previous library before linking to avoid duplicate symbols
  48. rm ../lib/$LIBRARY 2>/dev/null
  49.  
  50. # Other libraries which we may be dependent on.  Since we make the libraries
  51. # in the order libMesaGL.a, libMesaGLU.a, libMesatk.a, libMesaaux.a each
  52. # just depends on its predecessor.
  53. # (code picked up from mklib.aix)
  54. OTHERLIBS=`ls ../lib/*.so 2>/dev/null`
  55.  
  56. mwccppc -sharedlibrary -export pragma -term '' -init '' $SYSLIBS $OTHERLIBS -o $LIBRARY $OBJECTS
  57.